<template>
	<view id="domxee-content" :class="globalData.defaultThemes">
		<view id="header_wrapper">
			<nii-navbar :globalData="globalData" :scroll="scroll" back>
				<!-- <view slot="back"></view> -->
				<view slot="title">{{renders.main_title}}</view>
				<!-- <view slot="tools"></view> -->
			</nii-navbar>
		</view>
		<view id="content_wraapper">
			<view id="logo">
				<view class="logo_box">
					<u--image :src="renders.logo" width="200rpx" height="200rpx" mode="aspectFit" :bgColor="globalData.colors.current.section" class="logo">
					  <template v-slot:loading>
						 <image src="@/static/media/images/loading.png" mode="aspectFit"></image>
					  </template>
					  <template v-slot:error>
						 <image src="@/static/media/images/loading.png" mode="aspectFit"></image>
					  </template>
					</u--image>
				</view>
			</view>
			<view id="titles" class="text-center d-padding">
				<view id="title" class="fw-bolder">{{renders.title}}</view>
				<view id="description" class="vice_text">{{renders.description}}</view>
			</view>
			<!-- <view id="inviter" v-if="renders.inviter.enable">
				<view class="inviter d-padding">
					<view class="inviter_box border-color">
						<view class="inviter_info d-flex justify-content-between align-items-center">
							<view class="left d-flex align-items-center">
								<view class="avatar_box">
									<u--image :src="renders.inviter.avatar" width="100rpx" height="100rpx" mode="aspectFit" :bgColor="globalData.colors.current.section" class="avatar">
									  <template v-slot:loading>
										 <image src="@/static/media/images/loading.png" mode="aspectFit"></image>
									  </template>
									  <template v-slot:error>
										 <image src="@/static/media/images/loading.png" mode="aspectFit"></image>
									  </template>
									</u--image>
								</view>
								<view class="info">
									<view class="nickname fw-bold">{{renders.inviter.nickname}}</view>
									<view class="desc vice_text">ID：{{renders.inviter.id}} {{renders.inviter.mobile}}</view>
								</view>
							</view>
							<view class="right">
								<view class="button color fw-bolder" @click="cancelInvite">取消邀请</view>
							</view>
						</view>
					</view>
				</view>
			</view> -->
			<view id="mobile_form" v-if="!renders.wechat.show && data.sections.formData.mode == 'mobile'">
				<view class="mobile_form d-padding">
					<view class="mobile_form_box">
						<view class="mobile_info border-color-less-01 d-flex align-items-center">
							<view class="name main_text">手机号码</view>
							<input type="number" v-model="data.formData.username" maxlength="11" class="mobile main_text fw-bolder w-fill-available" placeholder-class="vice_text fw-normal" placeholder="请输入手机号码">
						</view>
						<view class="mobile_info border-color-less-01 d-flex align-items-center">
							<view class="name main_text">验证码</view>
							<input v-model="data.formData.yzm" class="code main_text fw-bolder" placeholder-class="vice_text fw-normal" type="text" placeholder-style="color: rgba(108, 114, 127, 1);"
								placeholder="请输入验证码">
							<!-- <text v-if="data.sections.bind.verify_seconds <= 0" @click="sendBindCode" class="color-143-100-233 font-28">获取验证码</text>
							<view v-else>剩余 {{data.sections.bind.verify_seconds}} 秒</view> -->
							
							<view v-if="data.sections.bind.verify_seconds <= 0" @click="sendBindCode" class="button bg text-nowrap text-center">获取验证码</view>
							<view class="button bg_less text-nowrap text-center" v-else>剩余 {{data.sections.bind.verify_seconds}} 秒</view>
							<!-- <input type="number" v-model="data.sections.formData.code" maxlength="4" class="code main_text fw-bolder" placeholder-class="vice_text fw-normal" placeholder="请输入验证码">
							<view class="button bg text-nowrap text-center" @click="sendVerifyCode('login')" v-if="data.sections.verify_seconds.login <= 0">获取验证码</view>
							<view class="button bg_less text-nowrap text-center" v-else>剩余 {{data.sections.verify_seconds.login}} 秒</view> -->
						</view>
					</view>
				</view>
			</view>
			<view id="password_form" v-if="!renders.wechat.show && data.sections.formData.mode == 'password'">
				<view class="password_form d-padding">
					<view class="password_form_box">
						<view class="password_info border-color-less-01 d-flex align-items-center">
							<view class="name main_text">手机号码</view>
							<input type="text" v-model="data.formData.username" class="mobile main_text fw-bolder w-fill-available" placeholder-class="vice_text fw-normal" placeholder="请输入手机号码">
						</view>
						<view class="password_info border-color-less-01 d-flex align-items-center">
							<view class="name main_text">登录密码</view>
							<input type="password" v-model="data.formData.password" class="mobile main_text fw-bolder w-fill-available" placeholder-class="vice_text fw-normal" placeholder="请输入账户密码">
						</view>
					</view>
				</view>
			</view>
			
			<view id="submit" v-if="!renders.wechat.show">
				<view class="submit d-padding">
					<view v-if="data.sections.formData.mode == 'mobile'" class="submit_button button_bg text-center fw-bold" @click="mobileLogin">立即登录</view>
					<view v-else class="submit_button button_bg text-center fw-bold" @click="profileLogin">立即登录</view>
				</view>
			</view>
			
			<view class="font-28 color-143-100-233 text-center pb-80 w-100 d-flex j-end d-padding box-border">
				<!-- #ifdef H5 -->
				<view @click="local" class="mt-40">
					立即下载APP
				</view>
				<!-- #endif -->
			</view>
			
			<view id="tools" v-if="!renders.wechat.show">
				<view class="tools d-padding">
					<view class="tools_box d-flex justify-content-between align-items-center">
						<!-- <view class="exchange fw-bold" v-if="data.sections.formData.mode == 'mobile'" @click="data.sections.formData.mode = 'password'">密码登录</view>
						<view class="exchange fw-bold" v-else @click="data.sections.formData.mode = 'mobile'">验证码登录</view> -->
						<!-- <view class="question vice_text" @click="shows.register = true">暂无账号，<span class="color fw-bolder">立即注册</span></view> -->
						<!-- <view class="question vice_text" @click="shows.question = true">遇到问题？</view> -->
					</view>
				</view>
			</view>
			<view id="third_platform" v-if="!renders.wechat.show && renders.third_platform.enable">
				<view class="third_platform d-padding">
					<view class="third_platform_box">
						<view class="title text-center vice_text">其他方式登录</view>
						<view class="platforms d-flex justify-content-evenly align-items-center">
							<view class="platform" v-for="(platform, index) in renders.third_platform.providers" :key="index" @click="providerLogin(platform.alias)">
								<u--image :src="platform.logo" width="80rpx" height="80rpx" mode="aspectFit" :bgColor="globalData.colors.current.section" class="platform_logo">
								  <template v-slot:loading>
									 <image src="@/static/media/images/loading.png" mode="aspectFit"></image>
								  </template>
								  <template v-slot:error>
									 <image src="@/static/media/images/loading.png" mode="aspectFit"></image>
								  </template>
								</u--image>
							</view>
						</view>
					</view>
				</view>
			</view>
		</view>	
	</view>
</template>
<script>
	export default {
		data() {
			return {
				globalData: {windowWidth: 0, statusBarHeight: 0, navHeight: 0, navigationBarHeight: 0, wechatCapsule: {width: 0, height: 0, top: 0, right: 0, bottom: 0, left: 0}, defaultThemes: [], colors: {}, configs: {} },
				scroll: 0,
				current_page: {route: '', params: {}, url: ''},
				ready: false,
				renders: {
					logo: '',
					main_title: '',
					title: '',
					description: '',
					// inviter: {enable: false,avatar: '',nickname: '',id: 0,mobile: '',invite_code: ''},
					third_platform: {enable: false,providers: [{alias: 'sinaweibo', logo: ''},{alias: 'weixin', logo: ''},{alias: 'qq', logo: ''}]},
				// 	urls: {user_agreement: '',privacy_policy: ''},
					wechat: {enable: false, title: '', alias: '', show: false, tip: ''},
				// 	popups: {bind: {title: '',description: ''},register: {title: '',description: ''},question: {title: '',lists: [],contacts: [{name: '', value: ''}]}}
				
				},
				shows: {
					isPasswordVisible: true,
					
					
					agreements: false,


					questions: false,
					bind: false,
				},
				data: {
					formData: {
						username: '',
						password: '',
						yzm: ''
						
						// invite_code: '',
						// mobile: '',
						// code: '',
						// bind_mobile: '',
						// bind_code: '',
						// oauth: {}
					},
					sections: {
						formData: {
							mode: 'password',
							username: '',
							invite_code: '',
							mobile: '',
							code: '',
							password: '',
							oauth: {},
							bind_code: '',
							register_code: '',
							register_password: '',
							register_pay_password: ''
						},
						
						is_agreement: false,
						is_password: true,



						redirect_uri: '',
						inviter: {
							id: 0,
							avatar: '',
							nickname: '',
							invite_code: '',
							mobile: ''
						},
						login_show: 'mobile',
						mobile_login: {
							verify_seconds: 0,
							button_active: false,
							verify_active: false,
						},
						bind: {
							verify_seconds: 0,
							button_active: false,
							verify_active: false,
						},
						password_login: {
							button_active: false
						}
					}
				},
			}
		},
		onLoad(options) {				//页面家在时操作（options可获取当前页面传递参数，如：options.id）
			//设置对象
			let that = this;
			//设置当前页面数据
			that.current_page = that.nii_common.pages.getCurrentUrl();
			//设置默认数据
			that.globalData = that.nii_common.pages.initGlobalData(getApp().globalData);
			//清除本地储存
			uni.removeStorageSync(process.projectEnv.AUTHENTICATE_ALIAS);
			//设置对象
			// let that = this, invite_code = options.invite_code, redirect_uri = options.redirect_uri, callback = options.cb;
			//设置当前页面数据
			// that.current_page = that.nii_common.pages.getCurrentUrl();
			//设置默认数据
			// that.globalData = that.nii_common.pages.initGlobalData(getApp().globalData);
			//判断是否存在邀请码
			// if (typeof (invite_code) !== 'undefined' && invite_code.length > 0) {
			// 	//设置邀请码
			// 	that.data.formData.invite_code = invite_code;
			// 	//发送请求
			// 	that.nii_common.request.build('app/oauth/inviter', {invite_code: invite_code}, 'POST', function (res) {
			// 		//设置数据
			// 		that.data.sections.inviter = res.data;
			// 	}, function (res) {
			// 		//提示失败
			// 		that.nii_common.toastAlert(res.msg);
			// 		//清空邀请码
			// 		that.data.formData.invite_code = '';
			// 	});
			// }
			// //判断是否存在返回链接
			// if (typeof redirect_uri !== 'undefined' && redirect_uri.length > 0) {
			// 	//设置邀请码
			// 	that.data.sections.redirect_uri = redirect_uri;
			// }
			// //判断是否为微信回调
			// if (typeof callback !== 'undefined' && callback.length > 0 && callback == 'mp') {
			// 	//设置默认阅读协议
			// 	that.data.sections.is_agreement = true;
			// 	//发送请求
			// 	that.nii_common.request.build('app/oauth/wechat/mp/detail', options, 'POST', function (res) {
			// 		//继续第三方登录逻辑
			// 		that.platformOauth('wechat.mp', res.data);
			// 	}, function (res) {
			// 		//提示失败
			// 		that.nii_common.toastAlert(res.msg);
			// 	}, function () {
			// 		//隐藏loading
			// 		that.nii_common.toastLoadingHide();
			// 	});
			// }
			//初始数据
			that.initInformation();
		},
		methods: {
			//默认跳转操作
			navigateAction: function(alias, requestParams = {}, action = 'navigate', authenticate = false, animationType = 'slide-in-right') {
				//设置对象
				let that = this;
				if(alias == ''){
					that.nii_common.toastAlert('即将开放');
				}else{
					//跳转页面
					that.nii_common.navigate.action(alias, requestParams, action, authenticate, animationType);
				}
			},
			initInformation: function() {
				//设置对象
				let that = this;
				//loading
				!that.ready && that.nii_common.toastLoading('加载中');
				//开始准备
				that.ready = false;
				//发起请求
				that.nii_common.request.build('oauth/information', that.options, 'POST', function (res) {
					//设置准备已就绪
					that.ready = true;
					//设置信息
					that.renders = res.data;
					console.log(that.renders.logo);
					//停止刷新
					uni.stopPullDownRefresh();	
				}, function (res) {
					//提示错误
					that.nii_common.toastAlert(res.msg);
				}, function(res) {
					//隐藏loading
					that.nii_common.toastLoadingHide();
				});	
			},
			changeLoginType(){
				console.log(this.data.sections.is_password);
				this.data.sections.is_password = !this.data.sections.is_password;console.log(this.data.sections.is_password);
			},
			closePopup: function(alias) {
				//设置关闭
				this.shows[alias] = false;
				//判断是否为绑定
				if (alias == 'bind') {
					//不设置为绑定
					this.data.formData.bind = false;
					//设置数据
					this.data.formData.code = this.data.formData.mobile = '';
					//检测按钮可点击状态
					this.checkButtonActive();
				}
			},
			// platformLogin: function(platform) {
			// 	//获取对象
			// 	const that = this;
			// 	//设置平台参数
			// 	that.data.formData.oauth = {};
			// 	//判断是否阅读协议
			// 	if (!that.data.sections.is_agreement) {
			// 		//显示弹窗
			// 		that.shows.agreements = true;
			// 		//弹窗提醒阅读
			// 		return false;
			// 	}
			// 	//判断触发平台
			// 	switch (platform) {
			// 		case 'wechat.mp':
			// 			//loading
			// 			that.nii_common.toastLoading('获取授权中...');
			// 			//发送请求
			// 			that.nii_common.request.build('app/oauth/wechat/mp', that.nii_common.pages.getCurrentUrl(),
			// 				'POST',
			// 				function(res) {
			// 					//跳转微信登录链接
			// 					window.location.href = res.data.redirect_uri;
			// 				},
			// 				function(res) {
			// 					//提示失败
			// 					that.nii_common.toastAlert(res.msg);
			// 				},
			// 				function() {
			// 					//隐藏loading
			// 					that.nii_common.toastLoadingHide();
			// 				});
			// 			break;
			// 		case 'wechat.mini':
			// 			//调用授权
			// 			uni.getUserProfile({
			// 				desc: '授权登录账户',
			// 				lang: "zh_CN",
			// 				success: (infoRes) => {
			// 					//获取用户信息
			// 					uni.getUserInfo({
			// 						success: function(infoRes) {
			// 							//调用登录
			// 							uni.login({
			// 								provider: 'weixin',
			// 								success: function(res) {
			// 									//获取授权code
			// 									let code = res.code;
			// 									//loading
			// 									that.nii_common.toastLoading(
			// 										'授权中...');
			// 									//发送请求
			// 									that.nii_common.request.build(
			// 										'app/oauth/wechat/mini', {
			// 											code: res.code,
			// 											iv: infoRes.iv,
			// 											encryptedData: infoRes
			// 												.encryptedData
			// 										}, 'POST',
			// 										function(res) {
			// 											//继续第三方登录逻辑
			// 											that.platformOauth(
			// 												platform, res
			// 												.data);
			// 										},
			// 										function(res) {
			// 											//提示失败
			// 											that.nii_common
			// 												.toastAlert(res
			// 													.msg);
			// 										},
			// 										function() {
			// 											//隐藏loading
			// 											that.nii_common
			// 												.toastLoadingHide();
			// 										});
			// 								},
			// 								fail: function() {
			// 									//提示错误
			// 									that.nii_common.toastAlert(
			// 										'授权登录失败');
			// 								}
			// 							});
			// 						},
			// 						fail: function(res) {
			// 							//提示错误
			// 							that.nii_common.toastAlert('用户失效');
			// 						}
			// 					});
			// 				},
			// 				fail: () => {
			// 					//提示错误
			// 					that.nii_common.toastAlert('授权失败');
			// 				}
			// 			});
			// 			break;
			// 		default:
			// 			//调用登录
			// 			uni.login({
			// 				provider: platform,
			// 				success: function(res) {
			// 					//获取用户信息
			// 					uni.getUserInfo({
			// 						provider: platform,
			// 						success: function(infoRes) {
			// 							//第三方授权登录
			// 							that.platformOauth(platform, infoRes);
			// 						},
			// 						fail: function() {
			// 							//提示错误
			// 							that.nii_common.toastAlert('授权信息获取失败');
			// 						}
			// 					});
			// 				},
			// 				fail: function() {
			// 					//提示错误
			// 					that.nii_common.toastAlert('授权登录失败');
			// 				}
			// 			});
			// 			break;
			// 	}
			// },
			// platformOauth: function(platform, infoRes) {
			// 	//获取对象
			// 	const that = this;
			// 	//初始化数据
			// 	var oauthParams = {
			// 		platform: platform,
			// 		oauth_id: '',
			// 		oauth_info: {}
			// 	};
			// 	//根据平台获取授权信息
			// 	switch (platform) {
			// 		case 'sinaweibo':
			// 			//设置信息
			// 			oauthParams = {
			// 				platform: 'weibo',
			// 				token: infoRes.userInfo.id,
			// 				oauth_info: infoRes.userInfo
			// 			};
			// 			break;
			// 		default:
			// 			//设置信息
			// 			oauthParams = {
			// 				platform: platform,
			// 				token: infoRes.userInfo.openId,
			// 				oauth_info: infoRes.userInfo
			// 			};
			// 			break;
			// 	}
			// 	//设置平台参数
			// 	that.data.formData.oauth = oauthParams;
			// 	//loading
			// 	that.nii_common.toastLoading('正在登录...');
			// 	//发送请求
			// 	that.nii_common.request.build('app/oauth/platform/check', that.data.formData, 'POST', function(res) {
			// 		//直接登录
			// 		that.nii_common.request.build('app/oauth/platform', that.data.formData, 'POST', function(
			// 			res) {
			// 			//提示成功
			// 			that.nii_common.toastAlert('登录成功', 'success');
			// 			//yanchi
			// 			setTimeout(function () {
			// 				//跳转页面
			// 				that.loginComplate(true);
			// 			}, 1500);
			// 		}, function(res) {
			// 			//提示错误
			// 			that.nii_common.toastAlert(res.msg);
			// 		}, function(res) {
			// 			//隐藏loading
			// 			that.nii_common.toastLoadingHide();
			// 		});
			// 	}, function(res) {
			// 		//隐藏loading
			// 		that.nii_common.toastLoadingHide();
			// 		//清空数据
			// 		that.data.formData.bind_mobile = that.data.formData.bind_code = '';
			// 		//设置倒计时
			// 		that.data.sections.bind.verify_seconds = 0;
			// 		//显示弹窗
			// 		that.shows.bind = true;
			// 	});
			// },
			loginComplate: function(complete = false) {
				//判断是否完成
				if (complete && this.data.sections.redirect_uri.length > 0) {
					//跳转页面
					this.navigateAction(this.data.sections.redirect_uri, {}, 'launch');
				} else {
					//跳转首页
					this.navigateAction('account.index');
				}
			},
			mobileLogin: function() {
				//获取对象
				const that = this;
				//验证数据
				if (!uni.$u.test.mobile(that.data.formData.username)) {
					//提示信息
					return that.nii_common.toastAlert('请输入有效手机号码');
				}
				//判断验证码
				if (!uni.$u.test.code(that.data.formData.yzm, 4)) {
					//提示信息
					return that.nii_common.toastAlert('无效验证码');
				}
				//判断是否阅读协议
				// if (!that.data.sections.is_agreement) {
				// 	//显示弹窗
				// 	that.shows.agreements = true;
				// 	//弹窗提醒阅读
				// 	return false;
				// }
				//loading
				that.nii_common.toastLoading('正在登录...');
				//发送请求
				that.nii_common.request.build('oauth/mobile_login', that.data.formData, 'POST', function(res) {
					//提示成功
					that.nii_common.toastAlert('登录成功');
					//跳转页面
					that.loginComplate(true);
				}, function(res) {
					//提示失败
					that.nii_common.toastAlert(res.msg);
				}, function() {
					//隐藏loading
					that.nii_common.toastLoadingHide();
				});
			},
			// bindLogin: function() {
			// 	//获取对象
			// 	const that = this;
			// 	//验证数据
			// 	if (!uni.$u.test.mobile(that.data.formData.bind_mobile)) {
			// 		//提示信息
			// 		return that.nii_common.toastAlert('请输入有效手机号码');
			// 	}
			// 	//判断验证码
			// 	if (!uni.$u.test.code(this.data.formData.bind_code, 4)) {
			// 		//提示信息
			// 		return that.nii_common.toastAlert('无效验证码');
			// 	}
			// 	//loading
			// 	that.nii_common.toastLoading('正在登录...');
			// 	//直接登录
			// 	that.nii_common.request.build('app/oauth/platform', that.data.formData, 'POST', function(res) {
			// 		//提示成功
			// 		that.nii_common.toastAlert('登录成功', 'success');
			// 		//关闭弹窗
			// 		that.shows.bind = false;
			// 		//清空数据
			// 		that.data.formData.bind_mobile = that.data.formData.bind_code = '';
			// 		//跳转页面
			// 		that.loginComplate(true);
			// 	}, function(res) {
			// 		//提示错误
			// 		that.nii_common.toastAlert(res.msg);
			// 	}, function(res) {
			// 		//隐藏loading
			// 		that.nii_common.toastLoadingHide();
			// 	});
			// },
			profileLogin: function() {
				//获取对象
				const that = this;
				//验证数据
				// if (uni.$u.test.isEmpty(that.data.formData.username) || uni.$u.test.isEmpty(that.data.formData.password)) {
				// 	//提示信息
				// 	return that.nii_common.toastAlert('用户名或密码不能为空');
				// }
				//判断是否阅读协议
				// if (!that.data.sections.is_agreement) {
				// 	//显示弹窗
				// 	that.shows.agreements = true;
				// 	//弹窗提醒阅读
				// 	return false;
				// }
				//loading
				that.nii_common.toastLoading('正在登录...');
				//发送请求
				that.nii_common.request.build('oauth/login', that.data.formData, 'POST', function(res) {
					//提示成功
					that.nii_common.toastAlert('登录成功');
					//跳转页面
					that.loginComplate(true);
				}, function(res) {
					//提示失败
					that.nii_common.toastAlert(res.msg);
				}, function() {
					//隐藏loading
					that.nii_common.toastLoadingHide();
				});
			},
			// sendVerifyCode: function() {
			// 	//获取对象
			// 	const that = this;
			// 	//验证数据
			// 	if (!uni.$u.test.mobile(that.data.formData.mobile)) {
			// 		//提示信息
			// 		return that.nii_common.toastAlert('请输入有效手机号码');
			// 	}
			// 	//loading
			// 	that.nii_common.toastLoading('正在发送...');
			// 	//发送请求
			// 	that.nii_common.request.build('app/currency/sms/authenticate', {
			// 		mobile: that.data.formData.mobile,
			// 		alias: 'login'
			// 	}, 'POST', function(res) {
			// 		//设置验证码
			// 		that.data.sections.mobile_login.verify_seconds = 60;
			// 		//开启定时器
			// 		var timer = setInterval(function() {
			// 			//更新验证码
			// 			that.data.sections.mobile_login.verify_seconds -= 1;
			// 			//判断数量
			// 			if (that.data.sections.mobile_login.verify_seconds <= 0) {
			// 				//关闭定时器
			// 				clearInterval(timer);
			// 			}
			// 		}, 1000);
			// 		//提示成功
			// 		that.nii_common.toastAlert('发送成功');
			// 	}, function(res) {
			// 		//提示失败
			// 		that.nii_common.toastAlert(res.msg);
			// 	}, function() {
			// 		//隐藏loading
			// 		that.nii_common.toastLoadingHide();
			// 	});
			// },
			sendBindCode: function() {
				//获取对象
				const that = this;
				//验证数据
				if (!uni.$u.test.mobile(that.data.formData.username)) {
					//提示信息
					return that.nii_common.toastAlert('请输入有效手机号码');
				}
				//loading
				that.nii_common.toastLoading('正在发送...');
				//发送请求
				that.nii_common.request.build('v2/send_code', {
					mobile: that.data.formData.username,
					// alias: 'bind'
				}, 'POST', function(res) {
					//设置验证码
					that.data.sections.bind.verify_seconds = 60;
					//开启定时器
					var timer = setInterval(function() {
						//更新验证码
						that.data.sections.bind.verify_seconds -= 1;
						//判断数量
						if (that.data.sections.bind.verify_seconds <= 0) {
							//关闭定时器
							clearInterval(timer);
						}
					}, 1000);
					//提示成功
					that.nii_common.toastAlert('发送成功');
				}, function(res) {
					//提示失败
					that.nii_common.toastAlert(res.msg);
				}, function() {
					//隐藏loading
					that.nii_common.toastLoadingHide();
				});
			},
			
			local(){
				window.location.href="http://ms-zhongyijiankang.com/apk/download.php";
			}
			// getInputUsername: function(e) {
			// 	//绑定信息
			// 	this.data.formData.username = e.detail.value;
			// 	//检测按钮可点击状态
			// 	this.checkButtonActive();
			// },
			// getInputPassword: function(e) {
			// 	//绑定信息
			// 	this.data.formData.password = e.detail.value;
			// 	//检测按钮可点击状态
			// 	this.checkButtonActive();
			// },
			// getInputMobile: function(e) {
			// 	//绑定信息
			// 	this.data.formData.mobile = e.detail.value;
			// 	//检测按钮可点击状态
			// 	this.checkButtonActive();
			// },
			// getInputCode: function(e) {
			// 	//绑定信息
			// 	this.data.formData.code = e.detail.value;
			// 	//检测按钮可点击状态
			// 	this.checkButtonActive();
			// },
			// getInputBindMobile: function(e) {
			// 	//绑定信息
			// 	this.data.formData.bind_mobile = e.detail.value;
			// 	//检测按钮可点击状态
			// 	this.checkButtonActive();
			// },
			// getInputBindCode: function(e) {
			// 	//绑定信息
			// 	this.data.formData.bind_code = e.detail.value;
			// 	//检测按钮可点击状态
			// 	this.checkButtonActive();
			// },
			// checkButtonActive: function() {
			// 	//验证信息
			// 	if (this.data.formData.username.length <= 0 || this.data.formData.password.length <= 0) {
			// 		//设置按钮可点击
			// 		this.data.sections.password_login.button_active = false;
			// 	} else {
			// 		//设置按钮可点击
			// 		this.data.sections.password_login.button_active = true;
			// 	}
			// 	//验证信息
			// 	if (!uni.$u.test.mobile(this.data.formData.mobile) || !uni.$u.test.code(this.data.formData.code, 4)) {
			// 		//设置按钮可点击
			// 		this.data.sections.mobile_login.button_active = false;
			// 	} else {
			// 		//设置按钮可点击
			// 		this.data.sections.mobile_login.button_active = true;
			// 	}
			// 	//验证数据
			// 	if (!uni.$u.test.mobile(this.data.formData.mobile)) {
			// 		//取消高亮
			// 		this.data.sections.mobile_login.verify_active = false;
			// 	} else {
			// 		//设置高亮
			// 		this.data.sections.mobile_login.verify_active = true;
			// 	}
			// 	//验证信息
			// 	if (!uni.$u.test.mobile(this.data.formData.bind_mobile) || !uni.$u.test.code(this.data.formData
			// 			.bind_code, 4)) {
			// 		//设置按钮可点击
			// 		this.data.sections.bind.button_active = false;
			// 	} else {
			// 		//设置按钮可点击
			// 		this.data.sections.bind.button_active = true;
			// 	}
			// 	//验证数据
			// 	if (!uni.$u.test.mobile(this.data.formData.bind_mobile)) {
			// 		//取消高亮
			// 		this.data.sections.bind.verify_active = false;
			// 	} else {
			// 		//设置高亮
			// 		this.data.sections.bind.verify_active = true;
			// 	}
			// },
		}
	}
</script>

<style lang="scss">
	#header_wrapper {
		.nav_back_button {
			width: 60rpx;
			height: 60rpx;
			line-height: 60rpx;
			.domxee_icon {
				font-size: 36rpx;
			}
		}
	}
	#content_wraapper {
		padding: 100rpx 0;
		#logo {
			.logo_box {
				margin: 0 auto;
				width: 200rpx;
				height: 200rpx;
				border-radius: 20rpx;
				.logo {
					display: block;
					width: 200rpx;
					height: 200rpx;
					border-radius: 20rpx;
				}
			}
		}
		#titles {
			margin-top: 40rpx;
			#title {
				font-size: 32rpx;
				line-height: 44rpx;
			}
			#description {
				margin-top: 10rpx;
				font-size: 24rpx;
				line-height: 34rpx;
			}
		}
		#inviter {
			margin-top: 50rpx;
			.inviter {
				.inviter_box {
					padding: 20rpx 30rpx;
					border-radius: 20rpx;
					.inviter_info {
						.left {
							margin-right: 40rpx;
							.avatar_box {
								width: 100rpx;
								height: 100rpx;
								border-radius: 100%;
								margin-right: 20rpx;
								.avatar {
									width: 100rpx;
									height: 100rpx;
									border-radius: 100%;
								}
							}
							.info {
								.nickname {
									font-size: 24rpx;
									line-height: 34rpx;
								}
								.desc {
									margin-top: 10rpx;
									font-size: 24rpx;
									line-height: 34rpx;
								}
							}
						}
						.right {
							.button {
								font-size: 24rpx;
								line-height: 34rpx;
							}
						}
					}
				}
			}
		}
		#mobile_form {
			margin-top: 50rpx;
			.mobile_form {
				.mobile_form_box {
					.mobile_info {
						padding: 20rpx 0;
						border-bottom: 2rpx solid;
						.name {
							min-width: 130rpx;
							font-size: 28rpx;
							line-height: 40rpx;
							margin-right: 30rpx;
						}
						.mobile {
							font-size: 28rpx;
							line-height: 40rpx;
						}
						.code {
							font-size: 28rpx;
							line-height: 40rpx;
							margin-right: 30rpx;
						}
						.button {
							width: 160rpx;
							border-radius: 10rpx;
							padding: 12rpx 20rpx;
							font-size: 24rpx;
							line-height: 34rpx;
						}
					}
					.mobile_info:last-child {
						margin-top: 30rpx;
					}
				}
			}
		}
		#password_form {
			margin-top: 50rpx;
			.password_form {
				.password_form_box {
					.password_info {
						padding: 20rpx 0;
						border-bottom: 2rpx solid;
						.name {
							min-width: 130rpx;
							font-size: 28rpx;
							line-height: 40rpx;
							margin-right: 30rpx;
						}
						.mobile {
							font-size: 28rpx;
							line-height: 40rpx;
						}
					}
					.password_info:last-child {
						margin-top: 30rpx;
					}
				}
			}
		}
		#submit {
			margin-top: 60rpx;
			.submit {
				.submit_button {
					padding: 28rpx;
					font-size: 32rpx;
					line-height: 44rpx;
				}
			}
		}
		#tools {
			margin-top: 30rpx;
			.tools {
				.tools_box {
					.exchange {
						font-size: 24rpx;
						line-height: 34rpx;
					}
					.question {
						font-size: 24rpx;
						line-height: 34rpx;
					}
				}
			}
		}
		#third_platform {
			margin-top: 100rpx;
			.third_platform {
				.third_platform_box {
					.title {
						font-size: 24rpx;
						line-height: 34rpx;
					}
					.platforms {
						margin-top: 60rpx;
						.platform {
							width: 80rpx;
							height: 80rpx;
						}
					}
				}
			}
		}
		#wechat {
			margin-top: 100rpx;
			.wechat {
				.wechat_box {
					.wechat_button {
						width: 100%;
						padding: 20rpx 0;
						background: #24DB5A;
						border-radius: 20rpx;
						.content {
							width: max-content;
							margin: 0 auto;
							.domxee_icon {
								margin-right: 20rpx;
								font-size: 46rpx;
								color: #FFFFFF;
								line-height: 50rpx;	
							}
							.title {
								font-size: 34rpx;
								color: #FFFFFF;
								line-height: 50rpx;	
							}
						}
					}
					.tip {
						margin-top: 30rpx;
						font-size: 26rpx;
						line-height: 34rpx;
					}
				}
			}
		}
		#agreements {
			margin-top: 200rpx;
			.agreements {
				.agreements_box {
					font-size: 24rpx;
					line-height: 34rpx;
					span {
						margin: 0 4rpx;
					}
				}
			}
		}
		
		
		
		
		
		
	}
	#question_popup {
		.title {
			font-size: 36rpx;
			line-height: 50rpx;
		}
		.descriptions {
			margin-top: 20rpx;
			padding: 0 30rpx;
			.desc {
				margin-top: 40rpx;
				font-size: 26rpx;
				line-height: 36rpx;
			}
		}
		.footer {
			margin-top: 110rpx;
			.line {
				margin-top: 10rpx;
				font-size: 26rpx;
				line-height: 36rpx;
			}
		}
	}
	#bind_popup {
		.title {
			font-size: 36rpx;
			line-height: 50rpx;
		}
		.mobile_form_box {
			margin-top: 50rpx;
			.mobile_info {
				padding: 20rpx 0;
				border-bottom: 2rpx solid;
				margin-top: 30rpx;
				.name {
					min-width: 130rpx;
					font-size: 28rpx;
					line-height: 40rpx;
					margin-right: 30rpx;
				}
				.mobile {
					font-size: 28rpx;
					line-height: 40rpx;
				}
				.code {
					font-size: 28rpx;
					line-height: 40rpx;
					margin-right: 30rpx;
				}
				.button {
					width: 160rpx;
					border-radius: 10rpx;
					padding: 12rpx 20rpx;
					font-size: 24rpx;
					line-height: 34rpx;
				}
			}
			
			.mobile_info:first-child {
				margin-top: 0;
			}
		}
		.submit {
			margin-top: 40rpx;
			.submit_button {
				padding: 28rpx;
				font-size: 32rpx;
				line-height: 44rpx;
			}
		}
		.description {
			margin-top: 60rpx;
			font-size: 24rpx;
			line-height: 34rpx;
		}
	}
	#register_popup {
		.title {
			font-size: 36rpx;
			line-height: 50rpx;
		}
		.mobile_form_box {
			margin-top: 50rpx;
			.mobile_info {
				padding: 20rpx 0;
				border-bottom: 2rpx solid;
				margin-top: 30rpx;
				.name {
					min-width: 130rpx;
					font-size: 28rpx;
					line-height: 40rpx;
					margin-right: 30rpx;
				}
				.mobile {
					font-size: 28rpx;
					line-height: 40rpx;
				}
				.code {
					font-size: 28rpx;
					line-height: 40rpx;
					margin-right: 30rpx;
				}
				.button {
					width: 160rpx;
					border-radius: 10rpx;
					padding: 12rpx 20rpx;
					font-size: 24rpx;
					line-height: 34rpx;
				}
			}
			
			.mobile_info:first-child {
				margin-top: 0;
			}
		}
		.submit {
			margin-top: 40rpx;
			.submit_button {
				padding: 28rpx;
				font-size: 32rpx;
				line-height: 44rpx;
			}
		}
		.description {
			margin-top: 60rpx;
			font-size: 24rpx;
			line-height: 34rpx;
		}
	}
	
</style>